<template>
  <view>
    <img
      src="https://www.unicorn-500.com/uploads/attach/2024/03/20240305/dffa55d05eb49c81f9d127a8102ba74b.png"
      style="width: 100%; height: 300upx; background: #f0f0f0"
    />
    <view style="text-align: center">
      <view style="font-size: 20upx; color: #666"
        >距离开幕还有：6天8时23分24秒</view
      >
      <view style="font-size: 30upx">{{ detailsData.title }}</view>
    </view>
    <view class="desc">
      {{ detailsData.small_text }}
    </view>
    <view style="padding: 0upx 20px">
      <view style="text-align: center">
        <view style="font-size: 26upx">大会资讯</view>
      </view>
      <view style="margin-bottom: 20upx" v-for="item in 4">
        <view style="margin-top: 20upx">
          <mainList :baseList="topCompanyBasicList" />
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import mainList from "@/components/mainList/index.vue";
import uTabs from "@/components/uTabs/index.vue";
export default {
  components: {
    mainList,
    uTabs,
  },
  data() {
    return {
      array: ["中国", "美国", "巴西", "日本"],
      index: 0,
      tabBasicList: [
        {
          name: "2024",
        },
        {
          name: "2023",
        },
        {
          name: "2022",
        },
        {
          name: "其他",
        },
      ],
      checkboxValue1: [],
      // 基本案列数据
      checkboxList1: [
        {
          name: "独角兽",
          disabled: false,
        },
        {
          name: "隐形独角兽",
          disabled: false,
        },
        {
          name: "其他",
          disabled: false,
        },
      ],
      topCompanyBasicList: [
        {
          id: 0,
          title: "2024年度全球独角兽企业500强大会",
          desc: "企业简介企业简介企业简介",
          tag: "企业标签",
          slot: "",
        },
        {
          id: 1,
          title: "2024年度全球独角兽企业500强大会",
          desc: "企业简介企业简介企业简介",
          tag: "企业标签",
          slot: "",
        },
        {
          id: 2,
          title: "2024年度全球独角兽企业500强大会",
          desc: "企业简介企业简介企业简介",
          tag: "企业标签",
          slot: "",
        },
      ],
      detailsData: {},
    };
  },
  onShow() {
    const eventChannel = this.getOpenerEventChannel();
    eventChannel.on("acceptDataFromSourcePage", (data) => {
      this.id = data.param.id;
      this.getDetails(data.param.id);
    });
  },
  methods: {
    async getDetails(id) {
      const res = await this.$api.getDahuiDetails({ id });
      this.detailsData = res;
    },
  },
};
</script>

<style scoped lang="scss">
.desc {
  margin-top: 20upx;
  font-size: 24upx;
  color: #666;
  margin-bottom: 20upx;
  background: #e5efff;
  padding: 20upx;
}
</style>